home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / binutils / configure.in < prev    next >
Text File  |  1994-10-04  |  3KB  |  107 lines

  1. # This file is a shell script that supplies the information necessary
  2. # to tailor a template configure script into the configure script
  3. # appropriate for this directory.  For more information, check any
  4. # existing configure script.
  5.  
  6. srctrigger=ar.c
  7. srcname="Binutils"
  8.  
  9. configdirs="testsuite"
  10.  
  11. # per-host:
  12.  
  13. . ${srcdir}/../bfd/configure.host
  14.  
  15. host_makefile_frag=
  16. if [ -f ${srcdir}/../bfd/config/${my_host}.mh ] ; then
  17.     host_makefile_frag=../bfd/config/${my_host}.mh
  18. fi
  19.  
  20. # per-target:
  21.  
  22. # Canonicalize the secondary target names.
  23. if [ -n "$enable_targets" ]; then
  24.     for targ in `echo $enable_targets | sed 's/,/ /g'`
  25.     do
  26.     result=`$configsub $targ 2>/dev/null`
  27.     if [ -n "$result" ]; then
  28.         canon_targets="$canon_targets $result"
  29.     else
  30.         # Allow targets that config.sub doesn't recognize, like "all".
  31.         canon_targets="$canon_targets $targ"
  32.     fi
  33.     done
  34. else
  35. # If our target is rs6000 _and nothing else_ then we build only nm!
  36.     case $target in
  37.     rs6000-*-lynx*) target_makefile_frag=config/rslynx ;;
  38.     esac
  39. fi
  40.  
  41. all_targets=false
  42. build_nlmconv=false
  43. nlmconv_defs=
  44. build_srconv=false
  45.  
  46. for targ in $target $canon_targets
  47. do
  48.     bfd_target=`${config_shell} $srcdir/../bfd/config.bfd $targ`
  49.  
  50.     if [ "x$bfd_target" = "xall" ]; then
  51.         all_targets=true
  52.     build_nlmconv=true
  53.     build_srconv=true
  54.     nlmconv_defs="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
  55.     else
  56.     case $targ in
  57.     i[345]86*-*-netware*) 
  58.       build_nlmconv=true 
  59.       nlmconv_defs="$nlmconv_defs -DNLMCONV_I386"
  60.       ;;
  61.     alpha*-*-netware*)
  62.       build_nlmconv=true
  63.       nlmconv_defs="$nlmconv_defs -DNLMCONV_ALPHA"
  64.       ;;
  65.     powerpc*-*-netware*)
  66.       build_nlmconv=true
  67.       nlmconv_defs="$nlmconv_defs -DNLMCONV_POWERPC"
  68.       ;;
  69.     sparc*-*-netware*)
  70.       build_nlmconv=true
  71.       nlmconv_defs="$nlmconv_defs -DNLMCONV_SPARC"
  72.       ;;
  73.     esac
  74.  
  75.     case $targ in
  76.     *-*-hms*) build_srconv=true ;;
  77.     esac
  78.     fi
  79. done
  80.  
  81. # We don't do any links based on the target system, just makefile config.
  82.  
  83. # post-target:
  84.  
  85. rm -f Makefile.tmp Makefile.2
  86. mv Makefile Makefile.tmp
  87.  
  88. if [ "x${build_nlmconv}" = "xtrue" ]; then
  89.     echo 'BUILD_NLMCONV = $(NLMCONV_PROG)' >> Makefile.2
  90.     echo "NLMCONV_DEFS = ${nlmconv_defs}" >> Makefile.2
  91. fi
  92.  
  93. if [ "x${build_srconv}" = "xtrue" ]; then
  94.     echo 'BUILD_SRCONV = $(SRCONV_PROG)' >> Makefile.2
  95. fi
  96.  
  97. if [ "x`${config_shell} $srcdir/../bfd/config.bfd $target _`" = "xyes" ]; then
  98.     underscore=1
  99. else
  100.     underscore=0
  101. fi
  102. echo "UNDERSCORE = ${underscore}" >> Makefile.2
  103.  
  104. cat Makefile.tmp >> Makefile.2
  105. rm -f Makefile.tmp
  106. mv Makefile.2 Makefile
  107.